<template>
  <span>
    <star-two-tone v-if="type === 'star'" />
    <like-outlined v-else-if="type === 'like'" />
    <message-filled v-else />
    {{ text }}
  </span>
</template>

<script lang="ts" setup>
import { StarTwoTone, LikeOutlined, MessageFilled } from '@ant-design/icons-vue';
import type { PropType } from 'vue';

type IconType = 'star' | 'like' | 'message';
defineProps({
  type: {
    type: String as PropType<IconType>,
    required: true,
  },
  text: {
    type: [String, Number],
    required: true,
  },
});
</script>
